package com.flx.mapper;

import entity.Login;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * (Login)表数据库访问层
 *
 * @author makejava
 * @since 2025-04-22 09:00:33
 */
@Mapper
public interface LoginMapper {

  @Select("SELECT * FROM login WHERE user_name=#{userName}")
  Login getByUserName(String userName);

  @Select("SELECT * FROM login WHERE user_name=#{userName} AND alias_name=#{aliasName}")
  Login userLogin(Login login);

  void insertUser(@Param("res") Login login);

  int delUser(String userName);
}

